home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3p / barrier.z / barrier
Encoding:
Text File  |  2002-10-03  |  3.2 KB  |  67 lines

  1.  
  2.  
  3.  
  4. BBBBAAAARRRRRRRRIIIIEEEERRRR((((3333PPPP))))                                                        BBBBAAAARRRRRRRRIIIIEEEERRRR((((3333PPPP))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      barrier, new_barrier, init_barrier, free_barrier - barrier functions
  10.  
  11. CCCC SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<uuuulllloooocccckkkkssss....hhhh>>>>
  13.  
  14.      bbbbaaaarrrrrrrriiiieeeerrrr____tttt ****nnnneeeewwww____bbbbaaaarrrrrrrriiiieeeerrrr ((((uuuussssppppttttrrrr____tttt ****hhhhaaaannnnddddlllleeee))));;;;
  15.  
  16.      vvvvooooiiiidddd ffffrrrreeeeeeee____bbbbaaaarrrrrrrriiiieeeerrrr ((((bbbbaaaarrrrrrrriiiieeeerrrr____tttt ****bbbb))));;;;
  17.  
  18.      vvvvooooiiiidddd iiiinnnniiiitttt____bbbbaaaarrrrrrrriiiieeeerrrr ((((bbbbaaaarrrrrrrriiiieeeerrrr____tttt ****bbbb))));;;;
  19.  
  20.      vvvvooooiiiidddd bbbbaaaarrrrrrrriiiieeeerrrr ((((bbbbaaaarrrrrrrriiiieeeerrrr____tttt ****bbbb,,,, uuuunnnnssssiiiiggggnnnneeeedddd nnnn))));;;;
  21.  
  22. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  23.      These routines provide a simple rendezvous mechanism for shared address
  24.      processes.
  25.  
  26.      _n_e_w__b_a_r_r_i_e_r takes a usptr_t as an argument to indicate the shared arena
  27.      from which to allocate the barrier.  The usptr_t is a previously
  28.      allocated handle obtained through a call to _u_s_i_n_i_t(_3_P).
  29.  
  30.      The _b_a_r_r_i_e_r function takes a pointer to a previously allocated and
  31.      initialized barrier structure (as returned by _n_e_w__b_a_r_r_i_e_r) and the number
  32.      of processes/sub-tasks to wait for.  As each process enters the barrier,
  33.      it spins (busy wait) until all _n processes enter the barrier.  At that
  34.      time all are released and continue executing.  The _b_a_r_r_i_e_r function
  35.      currently does not support greater than 256 waiters.
  36.  
  37.      _f_r_e_e__b_a_r_r_i_e_r releases all storage associated with _b.
  38.  
  39.      _i_n_i_t__b_a_r_r_i_e_r resets the barrier to its default state.
  40.  
  41.      _n_e_w__b_a_r_r_i_e_r will fail if one or more of the following are true:
  42.  
  43.      [ENOMEM]       There is not enough space to allocate a barrier structure.
  44.  
  45.      [ENOMEM]       It is not possible to allocate a lock.
  46.  
  47. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  48.      sproc(2), usinit(3P), ussetlock(3P), usunsetlock(3P), usnewlock(3P).
  49.  
  50. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  51.      Upon successful completion, _n_e_w__b_a_r_r_i_e_r returns a pointer to a barrier
  52.      struct.  Otherwise, a value of 0 is returned to the calling process.
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.